Creating a custom dataset of prompts your system has received allows you to both deeply understand how your system performed in the past and then run experiments to see how a redesign of your system might change performance on real-world prompts. Let's look at how to build one of those. A customized dataset is just a collection of prompts your system has previously processed, as well as any information you choose to collect about that prompt's journey through your system. You could choose to save just the initial prompt and final response, or you could add tons of information to your custom dataset, like which documents your vector database retrieved, the way those documents were ranked before and after your re-ranker, the output of your query rewriter, and so on and so forth. With so much flexibility, an important decision when building a custom dataset is what data do I store? The simple answer is, what do you want to evaluate? For example, you'll almost certainly want to save the input prompt submitted by users and the final responses generated by your RAC system. These two basic data points give some sense of system performance and would let you track how responses change with edits to prompts. That information, however, really only helps with end-to-end evaluation. If you want to do component-level evaluations to know how well your retriever, re-ranker, or query rewriter are performing, you'll need to save the input and output data used by each of those components. Typically, you'll want to have these detailed component-level steps recorded, and as a result, the tables used for logging calls to a RAC system can easily have dozens of columns, storing everything from the ID of the customer who made the call, to the text chunks your re-ranker sifted through, to the output of each router LLM in your Agentech workflow. Storing a wide variety of data like this allows you to analyze each component of the system individually and examine performance across many dimensions. For example, if you're building a customer service chatbot, you could filter by question topic to detect that questions about refunds are receiving high-quality responses, but questions about product delays are not performing well at all. When you go to investigate why those product delay-related prompts led to low-quality responses, you might be able to analyze the logs to detect that your retriever isn't able to find many relevant documents for those prompts. Maybe you need to add more relevant information to your knowledge base. If you build the right observability system in place, you'll be able to detect problems, pinpoint their sources, and feel confident that solutions are working. Let me share one example of this from my own career. I was working on a specialized RAC system that had the ability to generate text, images, and code-backed charts and diagrams using Mermaid.js. We started to receive complaints that the quality of some of the diagrams generated by the system was quite low. Working backwards through our logs, we realized that many of these issues arose when users asked the system to draw a diagram. The router language model misinterpreted this prompt and so sent it to the text-to-image model used for image generation. These models are pretty good at generating images of people or things, but pretty bad at generating charts. Once we realized the source of the problem, we were able to update the system prompt for the router LLM so that those prompts would create code-backed charts and not generated images. Thanks to a robust monitoring and logging system, once we received customer reports of the issue, it was straightforward to track down its source and quickly get a fix into production. While sometimes you'll want to track down poorly performing individual prompts like this, once you're logging lots of data, you'll often want to visualize it. This can let you identify high-level trends in the performance of the overall system or of each component. For example, you could visualize all of the input prompts that go through your system and use some sort of clustering algorithm to identify the high-level topics your customers are asking about, like product launches or troubleshooting questions. If you can differentiate all of these different prompts, then you can run your eval pipeline on only that type of prompt and see if your system is underperforming for certain types of questions. Custom datasets are an important tool for personalizing your RAG application to the requests to your system processes. Incorporating them into how you evaluate your system is the best way to improve the way your system responds to the actual prompt and questions your users are asking.